home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-12-19 | 3.1 KB | 159 lines | [TEXT/CWIE] |
- ///--------------------------------------------------------------------------------------
- // SpriteWorldUtils.h
- //
- // Portions are copyright: © 1991-94 Tony Myles, All rights reserved worldwide.
- //
- // Description: constants, structures, and prototypes for sprite utilities
- ///--------------------------------------------------------------------------------------
-
-
- #ifndef __SPRITEWORLDUTILS__
- #define __SPRITEWORLDUTILS__
-
- #ifndef __SWCOMMON__
- #include "SWCommonHeaders.h"
- #endif
-
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
- #ifndef __ICONS__
- #include <Icons.h>
- #endif
-
- #ifndef __QDOFFSCREEN__
- #include <QDOffscreen.h>
- #endif
-
- #ifndef __SPRITEWORLD__
- #include "SpriteWorld.h"
- #endif
-
- #ifndef __SPRITELAYER__
- #include "SpriteLayer.h"
- #endif
-
- #ifndef __SPRITE__
- #include "Sprite.h"
- #endif
-
- #ifndef __SPRITEFRAME__
- #include "SpriteFrame.h"
- #endif
-
-
- enum
- {
- kColorIconResType = 'cicn'
- };
-
- #ifndef NewColorSearchProc
- #define NewColorSearchProc(x) (x)
- #endif
-
- ///--------------------------------------------------------------------------------------
- // sprite utilities function prototypes
- ///--------------------------------------------------------------------------------------
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
-
- SW_FUNC OSErr SWCreateRegionFromCIconMask(
- RgnHandle *maskRgn,
- CIconHandle cIconH);
-
- SW_FUNC OSErr SWCreateRegionFromPict(
- RgnHandle *pictRgnH,
- PicHandle srcPictH);
-
- SW_FUNC OSErr SWCreateRegionFromPictResource(
- RgnHandle *pictRgnH,
- short pictResID);
-
- SW_FUNC OSErr SWGetCIcon(
- CIconHandle* cIconH,
- short iconResID);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRect(
- RgnHandle *maskRgn,
- GWorldPtr maskGWorld,
- Rect* frameRect);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRectStart(
- GWorldPtr *tempMaskGWorld,
- short maxWidth,
- short maxHeight);
-
- SW_FUNC void SWCreateRegionFromGWorldAndRectFinish(
- GWorldPtr tempMaskGWorld);
-
- SW_FUNC OSErr SWCreateRegionFromGWorldAndRectPartial(
- RgnHandle *maskRgn,
- GWorldPtr maskGWorld,
- GWorldPtr tempMaskGWorld,
- Rect* frameRect);
-
- SW_FUNC OSErr SWCreateGWorldFromPictResource(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *pictGWorldP,
- short pictResID);
-
- SW_FUNC OSErr SWCreateGWorldFromPict(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *pictGWorld,
- PicHandle srcPictH);
-
- SW_FUNC OSErr SWCreateGWorldFromCIconMask(
- SpriteWorldPtr destSpriteWorld,
- GWorldPtr *maskGWorldP,
- CIconHandle cIconH);
-
- SW_FUNC void SWSetTransparentColor(
- const RGBColor *RGB);
-
- SW_FUNC OSErr SWBlackenGWorld(
- GWorldPtr oldGWorld );
-
- SW_FUNC OSErr SWWhitenGWorld(
- GWorldPtr oldGWorld );
-
- pascal Boolean blackenColorSearch(
- RGBColor *RGB, long *position );
-
- pascal Boolean whitenColorSearch(
- RGBColor *RGB, long *position );
-
- SW_FUNC void SWClearStickyError(void);
-
- SW_FUNC OSErr SWStickyError(void);
-
- SW_FUNC void SWSetStickyIfError(
- OSErr errNum);
-
- SW_FUNC Boolean SWHasSystem7(void);
-
- SW_FUNC OSErr SWGetProcessorType(short *processorType);
-
- SW_FUNC short SW_ABS(short theNum);
-
- void SWAssertFail(char* filename, int lineNum);
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif /* __SPRITEWORLDUTILS__ */
-
-